#pragma once

#include <memory>
#include "Containers/Containers.h"
#include "Misc/CommonMacros.h"

class CASTFileNode;
class CByteCodeFile;

struct WHENGINE_API SErrorInfo
{
    TVector<CString> Messages; // include warning and error

    int32_t WarningCount=0;
    int32_t ErrorCount=0;

    bool IsErrorOccured()
    {
        return ErrorCount!=0;
    }

    void Print() const;

    CString ToString() const;
};


class WHENGINE_API CCompileResult
{
public:    
    SErrorInfo ErrorInfo;

    std::shared_ptr<CByteCodeFile> ByteCode;

};